<?php
namespace Orm\ArticleContent;

class ArticleContentModel extends \Base\BaseOrmModel{

    function __construct()
    {
        parent::__construct();
        $this->table = 't_article_content';
    }
    public function loadArticleImg($article_id)
    {
        $result = $this->fetchOne('content', "`article_id`={$article_id} AND `type` = ".\Orm\ArticleContent\ArticleContentClass::TYPE_IMG." AND `is_del` = 0 ORDER BY insert_time  LIMIT 1");
        if ($result) {
            return $result['content'];
        }
        return '';
    }
}